<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="__PUBLIC__/Admin/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<script type="text/javascript">
  var user_edit_url="{:U('Admin/User/editUser')}";
</script>

<title>添加用户</title>
</head>
<body>
<div class="pd-20">
  <form action="{:U('Admin/User/editUser')}" method="post" class="form form-horizontal" id="form-user-add">
    <div class="row cl">
      <input type="hidden" name="uid" value="<?php echo $res['id'] ?>"/>
      <label class="form-label col-3"><span class="c-red">*</span>用户名：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" placeholder="<?php echo $res['username'] ?>" placeholder="" id="user-name" name="user-name" datatype="*2-16" nullmsg="用户名不能为空" value="<?php echo $res['username'] ?>">
      </div>
      <div class="col-4">
      </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red"></span>性别：</label>
      <div class="formControls col-5 skin-minimal">
        <div class="radio-box">
          <input type="radio" value='男' checked="checked" id="sex-1" name="sex" datatype="*" nullmsg="请选择性别！">
          <label for="sex-1">男</label>
        </div>
        <div class="radio-box">
          <input type="radio" value='女'  id="sex-2" name="sex">
          <label for="sex-2">女</label>
        </div>
        <div class="radio-box">
          <input type="radio" id="sex-3" name="sex">
          <label for="sex-3">保密</label>
        </div>
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>手机：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" placeholder="<?php echo $res['phone'] ?>" placeholder="" id="user-tel" name="user-tel"  datatype="m" nullmsg="手机不能为空" value="<?php echo $res['phone'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>邮箱：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" placeholder="<?php echo $res['mail'] ?>" name="email" id="email" datatype="e" nullmsg="请输入邮箱！" value="<?php echo $res['mail'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">所在城市：</label>
      <div class="formControls col-2"> 
      <span class="select-box">
                <select class="select province" id="province" size="1" name="province" datatype="*" nullmsg="请选择所在城市！">
                        <option value="<?php echo $res['province']?>" selected><?php echo $res['province']?></option>
                </select>
        </span> 
        </div>
        <div class="formControls col-3"> 
               <span class="select-box">
                      <select class="select city" id="city" size="1" name="city" datatype="*" nullmsg="请选择所在城市！">
                            <option value="<?php echo $res['city']?>" selected><?php echo $res['city']?></option>     
                      </select>
               </span> 
        </div>
      <div class="col-4"> 
      </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">备注：</label>
      <div class="formControls  col-5">
        <textarea name="comment" id="comment" cols="" rows="" class="textarea"  placeholder="<?php echo $res['comment']?>" datatype="*10-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,100)" ><?php echo $res['comment']?></textarea>
        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <div class="col-9 col-offset-3">
        <!-- <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;"> -->
        <?php $uid = $res['id']?>
        <input  class="btn btn-primary radius" type="button" onclick="user_edit_save(this,<?php echo $res['id']?>)" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" >
      </div>
    </div>
  </form>
</div>
</div>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/layer1.8/layer.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/Validform_v5.3.2.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.admin.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.admin.doc.js"></script>
<script type="text/javascript">
$(function(){
	$("#form-user-add").Validform({
		tiptype:2,
	});
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
});
</script> 
<script type="text/javascript">
// function user_edit_save(obj,id) {
//   alert(id);
//   $.ajax({
//     url: user_edit_url,
//     type: 'POST',
//     dataType: 'json',
//     data: {param1: 'value1'},
//     success:function(result){
//         if(result.success==1){
          
//         }else if(result.success==0){
//           layer.msg('操作失败!');
//         }
//       }
//   })
// }
// $(function(){

//   function user_edit_save(obj,id){
//   var username = $('#user-name').val();
//   var sex = $('#sex-1').val();
//   var phone = $('#user-tel').val();
//   var email=$('#email').val();
//   var province = $('#province').val();
//   var city= $('#city').val();
//   var comment = $('#comment').val();
  
//   $.post(
      
    
//       user_edit_url,
//       {username:'username'},
    
//       function(result){
//         if(result.success==1){
//             alert(username);
//           }else if(result.success==0){
//             layer.msg('操作失败!');
//           }
//       }


//     );

// }
  
// })



// var 

//   // var i = parent.layer.getFrameIndex();
//   // parent.layer.close(i);

// </script>
<import type='Js' file="Js.citys,Js.setting" />
</body>
</html>